All Questions
39 questions
1vote
0answers
29views
Show more / show less in angular
<ng-container *ngFor="let item1 of errorItem.controls.errortype.value"> <ng-container *ngFor="let item of notesLog.slice(0,showmoreless ? undefined : 3)"> ...
1vote
1answer
54views
covert Object of Objects to Array of Arrays
I am trying to write a function that converts and object of objects into array of array. The array should have same child as in the objects. The object of object is like:- world@myId1 : { ...
0votes
2answers
510views
angular/firebase format retrieved data from firebase into array
hello guys i have a problem to format my firebase-data into array this is my service where im retrieving data from firebase filename: subcategory.service.ts export class SubcategoryService { ...
1vote
0answers
64views
How do I splice in an Object with empty attributes in Angular JS?
I'm trying to write a function that would allow me to add a new row with empty attributes. The $scope.book object has the following attributes title : qty : price : I figured out how to remove them ...
1vote
2answers
65views
Loop through array of arrays containing objects
This is my first time posting and I'm also very new to AngularJs and somewhat new to JavaScript in general. I hope I am providing enough info. I have an array containing arrays of objects [[{},{},{}],[...
1vote
1answer
188views
How to access the ID or name in an object array which is in another array?
I'm trying to loop through to get all of theids and names from objects that are in arrays which is in another array. It's giving me 'undefined' even when I try to grab from 1 specific object using: ...
0votes
2answers
200views
push to array within javascript object [duplicate]
function v1 executes w/o error, and console log shows the expected array populated w/ the response data. However, I'm trying to make life simpler down the road by returning 2 arrays within ...
-1votes
3answers
51views
Sort Filter Comare array of objects in a particular format
Sort my json in format as below : [{"x":"Jan-2017","y":41},{"x":"Feb-2017","y":20},{"x":"Mar-2017","y":45},{"x":"Apr-2017","y":29},{"x":"May-2017","y":59},{"x":"Jun-2017","y":378},{"x":"Jul-2017",...
0votes
1answer
46views
AngularJS sorting q.all array of objects from service is not working
i have seen many posts on this but for some reason I continue to run into a problem. I am returning multiple promises with $q.all. Each returned promise (from different vendors) is returning ...
1vote
0answers
289views
Objects added to array are overriding each other even when new array is created
I have multiple members and multiple classes. I am trying to iterate over each class and search for the convenient data of all members depending on each class; In other words same members are repeated ...
-5votes
2answers
2kviews
How to store list objects into array using angularjs or javascript?
I try to use parse the data from the server and exactly I got result but my issue I want them to store them into a array, I used .push function but it returning only a number of items and not the data ...
0votes
0answers
67views
Update JavaScript object property value, push to array, and then set back to original value
I am trying to update a Javascript object value so that I can push it into an new array for filtering, but I then need to reset the object's property value back to its original value for when the user ...
0votes
2answers
105views
Update an Array of Objects Using Form - AngularJS
I have a form with 3 inputs, which the user will insert the hex value for colors. I need to receive these values and to update one property of objects of an Array. This update will be just for front-...
0votes
2answers
897views
Building an array with select and objects in AngularJS
I'm trying to build an array that allows users to select from a set of options. I have a generic array of objects, and when I add a new item to my model, I am able to select one of those objects. ...
0votes
1answer
66views
JavaScript (Angular) array not returning?
so i am working on emptying a property (polygon) from an array of objects deleteAllZones = () => { let assetVal = this.asset.$$state.value let mapId = this.siMapUtils.mapId;...